<?php

$config = [
    'http' => [
        'host' => '127.0.0.1',
        'post' => 9000,
        'swoole' => [
            'post' => 1111,
        ]
    ]
];


$keys = 'http.post';

$arr = explode('.', $keys);

$data = $config;
foreach ($arr as $key => $value) {
    $data = $data[$value];
}



echo "<pre>";
print_r($data);
echo "</pre>";
echo PHP_EOL;

